home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / program / swagn_r.zip / NETWORK.SWG / 0027_Novell Reading.pas < prev    next >
Pascal/Delphi Source File  |  1994-08-25  |  2KB  |  82 lines

  1. Unit Litl_Nov;
  2.  
  3. (**********************************************************************)
  4. (*    by Kevin R. Pierce                                              *)
  5. (*       December 29, 1991                                            *)
  6. (*    Kev1n@aol.com                                                   *)
  7. (**********************************************************************)
  8. interface
  9.  
  10. type
  11.   LoginTime    = array[0..6] of byte;
  12.  
  13.   ConnectionInfo = record
  14.                      Object_ID   : longint;
  15.                      Object_Type : word;
  16.                      Object_Name : array[1..48] of char;
  17.                      Login_Time  : LoginTime;
  18.                      ApplicationNumber     : word;    {swap & display Hex}
  19.                    end;
  20.  
  21.   CnxnInfoREQUEST = record
  22.                       ReqBuffLen : word;  {always = 2}
  23.                       Mask       : byte;  {always = 16h}
  24.                       CnxnNo     : byte;  { >1 }
  25.                     end;
  26.  
  27.   CnxnInfoREPLY = record
  28.                     RepBuffLen : word;  {always = SIZEOF(ConnectionInfo) }
  29.                     Data       : ConnectionInfo;
  30.                   end;
  31.  
  32.  
  33. function  NOV_GetConnectionNumber:integer;
  34. procedure NOV_GetConnectionInformation(connection:byte; var
  35. Result:ConnectionInfo);
  36.  
  37. (**********************************************************************)
  38. implementation
  39.  
  40. uses
  41.   dos;
  42.  
  43. function NOV_GetConnectionNumber:integer;
  44.   var
  45.     buf : registers;
  46.   begin
  47.     buf.AH:=$DC;
  48.     intr($21,buf);
  49.     NOV_GetConnectionNumber:=buf.AL;
  50.   end;
  51.  
  52. procedure NOV_GetConnectionInformation(connection:byte; var
  53. Result:ConnectionInfo);
  54.   var
  55.     buf : registers;
  56.     req : CnxnInfoREQUEST;
  57.     rep : CnxnInfoREPLY;
  58.   begin
  59.     with buf do
  60.       begin
  61.         AH:=$E3;
  62.         DS:=seg(req);
  63.         SI:=ofs(req);
  64.         ES:=seg(rep);
  65.         DI:=ofs(rep);
  66.       end;
  67.     with req do
  68.       begin
  69.         ReqBuffLen := Sizeof(req)-2;
  70.         Mask       := $16;
  71.         CnxnNo     := Connection;
  72.       end;
  73.     fillchar(rep,sizeof(rep),0);
  74.     rep.RepBuffLen:=Sizeof(rep)-2;
  75.     intr($21,buf);
  76.     Result:=rep.data;
  77.   end;
  78.  
  79. end.
  80.  
  81.  
  82.